package com.example.leaveplushjava.ThrowData;


import lombok.Data;

@Data
public class Result {

    private Boolean success;

    private Object data;

    private String msg;

    public Result ok(String msg){
        this.setMsg( msg );
        this.setSuccess(true);
        return this;
    }

    public Result data(Object data){
        this.setData(data);
        return this;
    }

    public Result fail(String msg){
        this.setMsg( msg );
        this.setSuccess(false);
        return this;
    }
}
